home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000153_icon-group-sender_Mon Dec 9 08:31:09 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gB9FV7k24216
  4.     for icon-group-addresses; Mon, 9 Dec 2002 08:31:07 -0700 (MST)
  5. Message-Id: <200212091531.gB9FV7k24216@baskerville.CS.Arizona.EDU>
  6. From: ernobe <ernobe@msn.com>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: Icon compiler
  9. Date: Mon, 9 Dec 2002 15:23:50 +0200
  10. X-Newsreader: MicroPlanet Gravity v2.50
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. In article <3df45481$1_7@news.meganetnews.com>, aa@bb.cc says...
  16. > Thanks for your answer.
  17. > > The Icon-to-C (iconc) compiler can produce very fast programs. I recall
  18. > once
  19. > > using it on the Icon versions of uuencode / uudecode ("iiencode.icn" and
  20. > > "iidecode.icn" in the IPL) and ran some timing checks. The iconc versions
  21. > of
  22. > > iiencode / iidecode were over 3 times as fast as the interpreted (icont /
  23. > > iconx) versions. More surprisingly, I found that the iconc programs were
  24. > > actually faster than native C uuencode / uudecode programs that I was
  25. > using
  26. > > at the time!
  27. > Well ... I have this Fibonacci test for benchmarks. With MS C ++ it takes 8
  28. > secs to calculate the result for 40 as input and for Icon it takes about 600
  29. > secs. Now with even 3 times speed improvement, it'd still be 200 secs for
  30. > Icon. Given that, I think it's very exaggerated to say Icon programs can be
  31. > faster than C. However slow compared to C, I do recognise Icon's power and
  32. > I'm considering adding it to my software toolchest.
  33.  
  34. Icon is meant to enable people to code more efficiently than in C.  Given that 
  35. it is people who produce computer programs, not computers programmed in C, to 
  36. refer to it as simply another tool in ones toolchest seems rather derogatory.  
  37. In fact it would probably not be far fetched to say that if everything that is 
  38. done in C nowadays would be done in Icon, there would not be a noticeable 
  39. difference, and programs would have much more functionality and attractiveness 
  40. to users. 
  41. I don't know much about computers myself, I can't really tell what an Icon to C 
  42. translator is, but since there is a compiler which produces executables and is 
  43. itself coded in C, it would probably take just someone well grounded in C to 
  44. make a translator.  Of course the reason it hasn't is obvious to those familiar 
  45. with the problems of implementing a low-level language across several platforms 
  46. and OS.  Until such time as there is more agreement about such platforms and OS 
  47. to make generalized low-level language programming efficient, Icon programmers 
  48. are well advised to familiarize themselves with C or Assembly, and optimize 
  49. their programs themselves.
  50. I think functions programmed in C can be called, I don't know if it is possible 
  51. to add machine code, but it sounds like something a-lot simpler to accomplish 
  52. than in most other computer languages.  It is a great way to learn Assembly, I 
  53. think, if one could learn how to optimize generators. 
  54.  
  55.    
  56.  
  57. -- 
  58. my esoteric links:
  59. http://www.costarricense.cr/pagina/ernobe/
  60.